package com.example.petcare.config;




import com.alipay.api.request.AlipayTradePagePayRequest;


import lombok.Data;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 *
 */
@Data
@Component
public class AlipayConfig {
    /**
     * 沙箱appId
     */
    public static final String APPID = "9021000144699282";

    /**
     * 请求网关  固定
     */
    public static final String URL = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";

    /**
     * 编码
     */
    public static final String CHARSET = "UTF-8";

    /**
     * 返回格式
     */
    public static final String FORMAT = "json";

    /**
     * RSA2
     */
    public static final String SIGNTYPE = "RSA2";

    /**
     * 异步通知地址
     */
    public static final String NOTIFY_URL = "http://localhost:8080/user/alipay/notify";

    /**
     * 同步地址
     */
    public static final String RETURN_URL = "http://localhost:8080/user/alipay" +
            "/success";

    /**
     * 应用私钥 pkcs8格式
     */
    public static final String RSA_PRIVATE_KEY =
            "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCuoURpJdPFXeQJz8vkx6uRitveI9d0a8lN14oAim66ZR7cQ/CuNsn2Bw7+vLtO/xwLhTnIpHEUT/Rr5oZn5WpUay5NuE69sq438Ng4YycRhKamEZUFk0jKnD+j5clFGtxLcEeKsluIM1O9SakxjsRpgu3Qzku8w/CrJRya7acgYi8ER0DZjiJ7ou88/KNzeoqIf7fG2Otg9i2OE9AAT+GgOmGFOr62AV24rl8VtrgnjwtLNNtX8aGQZZXIAoIZumYLLncKyzrMmf4Iq9HS+cJ4SRg0YDJEes3kEs1xBBRDbOMDPjzUXkUdWhkDjVvUYRop+k2iTWqdhbVErFBTDbblAgMBAAECggEAPVIJuLZ8v5Bxs/RQz5xBpdDR1hZV4N68iGYIYpo5uaAqjwQYbsR0dL0TyeWyDFJOocj9enQr9QsCdCU1yyPnC4+7abUviTNGNASRmHNQ07j139jKsHOAmwz01/OnkmmVM7RQmuZ4d8I2RICqNenBFJ/SLIFUXQuc5iwY+Fo9VoQvJxtrKlpki/G+RCwML/PzpTendEdJwlM8V/SXVEOWGPalUY9ATQ2e3OG2X9cfzURPQj+ujZr0OgyTbzVe20RnlHImJS5hMOLnLLaW262Mzza0YjJFywxHlc/QIxH779kU3ipnfCTh8soNv3r8aIWELDb4gAHQHmAO8gw5efmBvQKBgQDWQbOOSrGZMswW/2OY7hHvJ9M+GxA91DB1WdGj1GKggB8XpqlAG/1w+f7kAQaSKUBQVh4gTIfeSh+xUl3CNvWX+xYD2+s9SiyeK6PEpSDXnM799jysAwhbPhyUSUzALOK832JDRYClz7DcxFcqkvzolAye6Jx9rFZA91IXdZPXjwKBgQDQpyNw0R8uoU5tS0QSJCM1Nio/oEBDGJpZpZHc3oDvPt4iz2wKhIvt9oLb5jSyVM7DbYIi8OBb9BFZAndfmWbw6p8LqHpx5gJyz+V+V5HIwNnlo0LWynk3JOrSUyeSL1XNSexPGL7UYVymlnvMJHVUCkY5CDlfeWjifFPrhyFwSwKBgCuFLPO6OFjl+I6zUYe+0+XAMShsVuA4OZ+cnvioK2BupeIn+DkNdm18Wkn161/FAUtQMs5cvTxp0gYytNi+USSN2+rswNuyNV3rf1hyMjmZoHH1kl1eQFRISYXVXcGrXGMA/PStKXSEu2gceZgsQzL635VnqmHcn6iSlBovx9gBAoGAB5iuL6NNcVMqGcyNs+Ng7MUGEL7y1/6DUBQ5FUN8ijlNuRK4KkHdHlLFPOBKtttjk7Xe8Qq4AGEIaKcwVWiuWMMR+0is/IyVNjzfbBQgGKD8zeF9w3gnpZxQeEvSuv3CL/ErC04pVG4fA2mjJDGHnAGrwNPN0u4GpYhFPePzkbUCgYAc1sbfZWqiVqdX+C/bdy70GsZcrOAslQJY/aplX/NGTHxoVoTz/xY5V4KShviY84v0//ZA+XxZ/0I/2igmkTfA8jKSJEmbu2zJh65Y7KSOCXd6GWSi9wjqnzu0lyRQ9YWiilCrvpQ0CpPHEK2Ac2r1Jvccx4Y3j4LIRHfQbFXo7w==";
    /**
     * 沙箱支付宝公钥z'z'z
     */
    public static final String ALIPAY_PUBLIC_KEY =
            "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzak7fWto3rhFeiSKsl9lqHihw7AdCknvPFZd2n4WVr3WwgF/flqhqfU40zNn8vv4XwjP+GBWFAQzQgDxMSezvKASmphbBT4Gi8N6y34bc5DobloIgABST2sJI45m87WIopvpdD/B7FHMQ+pbMnPIQmx3VGyeZBnNWW4NBj6Xh64aoFPTpx0wSVGWGgpcCOt3PYkfJSbjlX+ihKl8/FW2pVJ22bmL3ucFaeYzhKz7PfTDNaFuso3IQy7qcX73b5jdLiOcrf2UNT5CrmpPKEV+hgBHpmJwTfbesyDKAMepk52/oeGzmj7sDv2yHshliiYud7hm645aJGMkOe8I3njvMQIDAQAB";

    private AlipayConfig() {
    }// 私有构造方法


    //多列模式的 aliPayRequest
    @Bean
    public AlipayTradePagePayRequest alipayTradePagePayRequest(){
        AlipayTradePagePayRequest alipayRequest = new AlipayTradePagePayRequest();//创建API对应的request
        return alipayRequest;// 返回
    }
}
